; E:\PORNPOJ\PROGRAMMINGCONTEST\DEMO\DEMO01.C - Compiled by CC68K  Version 5.00 (c) 1991-2005  Peter J.Fondse
; #include <stdio.h>
; #include <string.h>
; #include "demo01.h"
; int i;
; void main(void)
; {
       section   code
       xdef      _main
_main:
       movem.l   A2,-(A7)
       lea       _i,A2
; for(i = 0; test[i] != 0; i++);
       clr.l     (A2)
main_1:
       move.l    (A2),D0
       lea       _test,A0
       move.b    0(A0,D0.L),D0
       ext.w     D0
       ext.l     D0
       tst.l     D0
       beq.s     main_3
main_2:
       addq.l    #1,(A2)
       bra       main_1
main_3:
; //i = strlen(test);
; printf("%d\n",i);
       move.l    (A2),-(A7)
       pea       @demo01_1
       bsr       _printf
       addq.w    #8,A7
       movem.l   (A7)+,A2
       rts
; }
       section   data
       xdef      _test
_test:
       dc.b      103,121,55,114,54,50,109,52,114,57,0
@demo01_1:
       dc.b      37,100,10,0
       section   bss
       xdef      _i
_i:
       ds.b      4
       xref      _printf
